<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">

    <title>大厅界面</title>
    <!-- 添加函数 -->
    <script type="text/javascript">
        function queryPubByLike() {
            //查询form
            document.SoursForm.action="${pageContext.request.contextPath}/queryPubByLike.action";
            document.SoursForm.submit();
        }
    </script>
</head>
<body>
<form name="SoursForm">

<div style="text-align: center;width: 100%;height: 100px;background-color: cadetblue;">
    <h3>资源共享系统大厅</h3>
</div>
<div>
    <nav style="background-color: burlywood;height: 30px;">
        <ul style="list-style: none;">
            当前用户：${username}
            <c:if test="${username!=null}">
                <a href="${pageContext.request.contextPath}/person?username=${username}">个人中心</a>
                <a href="${pageContext.request.contextPath}/exit">退出</a>
            </c:if><br>
        </ul>
    </nav>
</div>

<div style="text-align: center;">
    <form action="http://www.baidu.com/s" method="POST" target="_blank">
        <input type="text" name="wd" size="38" />
        <input type="submit" value="百度搜索" />
        <%--<input type="hidden" name="ie" value="utf-8" />--%>
        <%--<input type="hidden" name="tn" value="ace" />--%>
    </form>
    <a href="${pageContext.request.contextPath}/toWrite?username=${username}">点击此处进行资源录入</a>
</div>

<div  style="text-align: center;">
    <table style=" margin: 0px auto;" border=1">
        <tr>
            <td>资源ID</td>
            <td>资源链接</td>
            <td>资源分类</td>
            <td>资源关键词</td>
            <td>资源简介</td>
        </tr>
        <tr>
            <td><a>1</a></td>
            <td><a></a></td>
            <td><a></a></td>
            <td><a></a></td>
            <td><a></a></td>
        </tr>
        <tr>
            <td><a>2</a></td>
            <td><a></a></td>
            <td><a></a></td>
            <td><a></a></td>
            <td><a></a></td>
        </tr>
        <tr>
            <td><a>3</a></td>
            <td><a></a></td>
            <td><a></a></td>
            <td><a></a></td>
            <td><a></a></td>
        </tr>
        <tr>
            <td><a>4</a></td>
            <td><a></a></td>
            <td><a></a></td>
            <td><a></a></td>
            <td><a></a></td>
        </tr>
        <tr>
            <td><a>5</a></td>
            <td><a></a></td>
            <td><a></a></td>
            <td><a></a></td>
            <td><a></a></td>
        </tr>
        <tr>
            <td><a>6</a></td>
            <td><a></a></td>
            <td><a></a></td>
            <td><a></a></td>
            <td><a></a></td>
        </tr>
    </table>
</div>

<div style="text-align: center;">
    请输入关键词
    <input type="text" name="pubCustom.sourcead" placeholder="java"/>
    <!-- 点击按钮，调用函数进行本站查询-->
    <input type="button" value="查询" onclick="queryPubByLike()"/>
</div>

<div style="text-align: center;">
    公共资源分类:
    <c:forEach items="${typeList}" var="type">
        <tr>
            <a href="${pageContext.request.contextPath}/ShowByType?Type=${type}">${type}</a>
        </tr>
    </c:forEach>
</div>
<div style="background-color: cadetblue;">
    <hr>
</div>
<div style="text-align: center;">
    <h4 style="color: cadetblue;">资源共享系统</h4>
</div>
</form>
</body>
</html>

